#!/usr/bin/python3
''' judge user exist or not exist '''

import subprocess
f_passwd = subprocess.getoutput("cat /etc/passwd")
f_lines = f_passwd.splitlines()
a = [x.split(":")[0] for x in f_lines]
u_name = input("please input a user name:")
if u_name in a:
    print("the user %s is exists" % u_name)
else:
    print("the user %s is not exists" % u_name)
